package cn.edu.zafu.bigdata.x.wgj.j;
import java.net.InetAddress;
import java.net.UnknownHostException;
public class ServerIPFinder {
    public static void main(String[] args) {
        try {
            InetAddress localHost = InetAddress.getLocalHost();
            System.out.println("服务端所在机器的IP地址是: " + localHost.getHostAddress());
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
    }
}
